﻿{layout:default} {class:Shop.Admin.cms.UserNodeList}
<lbhead>
    <title><%=Tag(UserNode.Name)%>-<%=site.title%></title>
</lbhead>
<lbpath>
    <div class="tools">
        <ul>
            <%if (PageReturnMsg == ""){%>
            <li class="add"><a href="javascript:void(0);" onclick="Node_Edit(<%=UserNode.id %>,0);"><b></b><span><%=Tag("添加")%></span></a></li>
            <li class="del"><a href="javascript:void(0);" onclick="Node_Del();"><b></b><span><%=Tag("删除")%></span></a></li>
            <li class="language"><a href="javascript:void(0);" onclick="Update('<%=code %>',0,'Node');"><b></b><span><%=Tag("语言")%></span></a></li>
            <%}%>
            <li class="name"><span id="navIgation">
                <%=Tag("当前位置")%>：<a href="<%=site.AdminPath %>/Ajax/ajax_admin.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a>
                >
                <%=Tag(UserNode.Name)%></span></li>
        </ul>
    </div>
</lbpath>
<lbbody>
    <div class="searchbox">
        <select id="lang">
            <option value="">┌<%=Tag("语言")%></option>
            <%=Shop.Bussiness.Language.LanguageOption(lang)%>
        </select>
        <input type="text" id="key" name="key" class="input-query" value="<%=key %>" onkeydown="if(event.keyCode==13){search_();}" /><input type="button" id="btnSou" class="btn-query" onclick="search_();" />
    </div>
    <table cellspacing="0" border="0" id="list" style="width: 100%; border-collapse: collapse;"
        class="datalist">
        <tr class="title">
            <th style="width: 40px" class="selectAll">
                <a href="javascript:void(0);" onclick="$('input[name=\'ids\']').attr('checked',!$(this).attr('checked'));$(this).attr('checked',!$(this).attr('checked'));">
                    <%=Tag("全选")%></a>
            </th>
            <th style="width: 40px">
                <%=Tag("ID")%>
            </th>
            <th style="width: 80px">
                <%=Tag("语言")%>
            </th>
            <th style="width: 200px">
                <%=Tag("分类名称")%>
            </th>
            <th style="width: 100px">
                <%=Tag("内容")%>
            </th>
            <th style="width: 100px">
                <%=Tag("展示形式")%>
            </th>
            <th style="width: 80px">
                <%=Tag("排序")%>
            </th>
            <th>
                <%=Tag("操作")%>
            </th>
        </tr>
        <div id="listinfo" style="display: none;">
            <tbody>
                <%=GetTreeString(UserNode.id, 0)%>
            </tbody>
        </div>
    </table>
    <script type="text/javascript">
        function Node_Edit(pid, id) {
            var title_ = "<%=Tag("编辑")%>";
            if (id == 0) title_ = "<%=Tag("添加")%>";
            var url_ = "usernode_edit_window.aspx?id=" + id + "&pid=" + pid;
            var width_ = 600;
            var height_ = "auto";
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
        function Node_Del(id) {
            if (!confirm("<%=Tag("确认要删除吗？")%>"))
                return false;
            var postData = GetFormJsonData("del");
            var url = "<%=site.AdminPath %>/ajax/ajax_node.aspx?__Action=UserNode_Del&PageCode=<%=PageCode %>";
            RequestAjax(url,postData,function(){MsgBox(1, '<%=Tag("操作成功") %>','?')});
        }
        function Page_List(id) {
            window.location = "pagelist.aspx?Node_id=" + id;
        }
        function Page_Edit(nodeid, id) {
            window.location = "page_edit.aspx?Node_id=" + nodeid + "&Page_id=" + id;
        }
        function search_() {
            var lang = $("#lang").val();
            var key = $("#key").val();
            window.location = "?Node_id=<%=UserNode.id%>&key=" + escape(key) + "&lang=" + lang;
        }
        function Update(id,ids,table) {
            var title_ = "<%=Tag("设置语言")%>";
            if (ids == 0)
                ids = GetChkCheckedValues("ids");
            var url_ = "<%=site.AdminPath %>/config/setlanguage_edit_window.aspx?id=" + id+"&ids=" + ids+"&table="+table;
            var width_ = 500;
            var height_ = "auto";
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
    </script>
</lbbody>
<lbbottom>
<div class="bottom" id="body_bottom">
</div>
</lbbottom>